package BeanUtils.T1;

import org.apache.commons.beanutils.BeanUtils;

import java.lang.reflect.InvocationTargetException;

public class T1 {

    public static void main(String[] args) throws InvocationTargetException, IllegalAccessException {

        Cat c = new Cat();
        BeanUtils.setProperty(c,"name","招财");
        BeanUtils.setProperty(c,"age",3);
        BeanUtils.setProperty(c,"color","白色");
        BeanUtils.setProperty(c,"sex","男");

        System.out.println(c);

    }
}
